package com.trafficsys.modules.loginAndRegister.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.trafficsys.modules.entity.DriveCard;
import com.trafficsys.modules.entity.Driver;
import com.trafficsys.modules.entity.Ticket;
import com.trafficsys.modules.entity.TravelCard;
import com.trafficsys.modules.loginAndRegister.pojo.TicketAndRule;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

/**
 * @Author Zhao Bin
 * @Date 2021/9/28 13:04
 * @Version 1.0
 */
public interface DriverService {
    //驾驶员注册方法    驾驶员功能
    HashMap<String,Object> register(Driver driver);
    //驾驶员登录    驾驶员功能
    HashMap<String,Object> driverLogin(Driver driver);
    //根据cardId查询个人信息    驾驶员功能
    HashMap<String,Object> getDriverByCardId(String cardId);
    //驾驶员查询自己驾驶证    驾驶员功能
    IPage<DriveCard> getDriveCardByCardId(Page<DriveCard> page, String cardId);
    //驾驶员查询自己行驶证    驾驶员功能
    IPage<TravelCard> getTravelCardByCardId(Page<TravelCard> page, String cardId);
    //根据phone查询到驾驶员信息
    HashMap<String,Object> getDriverByPhone(String phone);
    // 修改驾驶员信息
    HashMap<String,Object> updateDriver(Driver driver);
    //获取权限
    HashMap<String,Object> driverSelectPower(String cardId);
    //退出系统
    HashMap<String,Object> driverLogout(Driver driver);
    //查询用户 已处理罚单信息
    IPage<TicketAndRule> getSolvedTicketAndRuleByCardId(Page<TicketAndRule> page, String cardId);
    //查询用户 未处理罚单信息
    IPage<TicketAndRule> getNoSolveTicketAndRuleByCardId(Page<TicketAndRule> page, String cardId);
    //处理罚单
    HashMap<String,Object> solveTicket(String id,String cardId,String cutScore);
    //分页查询所有驾驶证
    IPage<DriveCard> getAllDriveCard(IPage<DriveCard> page);
    //分页查询所有行驶证
    IPage<TravelCard> getAllTravelCard(IPage<TravelCard> page);
}
